<?php
declare(strict_types=1);

namespace App\Models\User\Article;

class ArticleCate extends \App\Models\Article\ArticleCate
{
    protected $appends = [
        "count",
    ];

    public function getCountAttribute($key): int
    {
        return ArticleContent::query()->where("cate_uid", "=", $this->getAttribute("uid"))->count();
    }
}
